/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mx.com.switz.controller;

import mx.com.switz.utils.mail.MailMail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 *
 * @author VAIO
 */
@Controller
@RequestMapping("email/")
public class DhtmlXController {
     @Autowired
    private MailMail mailMail;
    
    @RequestMapping("email")
    public String goForm(){
        return "email/mailSend";
    }
    
    @RequestMapping(value="javamail",method= RequestMethod.GET)    
    public String javamail(@RequestParam("para") String para,@RequestParam("asunto") String asunto,@RequestParam("mensaje") String mensaje){
         mailMail.sendMail(para, asunto,
                            mensaje);
         
          return "email/mailSend";
    }
    
      @RequestMapping("grid")
    public String goGrid(){
        return "dhtmlx/grid";
    }
    
      @RequestMapping("dataview")
      public String goDataView(){
          return "dhtmlx/dataview";
      }
}
